package dao

//公用

// 排序条件
var orderCondition = "sort desc,id desc"

// WhereMap 必要的搜素条件 - map
var WhereMap = map[string]interface{}{"status": 0}

var DisableStatus = uint(1) // 0 未知 1 启用 2 禁用

////WhereStruct 必要的搜素条件 - struct
//type WhereStruct struct {
//	Status int
//}

/*
WhereStruct 筛选条件

	whereMap := dao.WhereStruct{
		Where: map[string]interface{}{
			"scene":    s.Scene,
			"id":       " In (20, 21, 22)",
			"age":      " > 14",
			"name":     " LIKE %jin%",
			"createAt": "BETWEEN  [?替换成自己需要的筛选参数] AND  [?替换成自己需要的筛选参数] ",
		},
		NotWhere: map[string]interface{}{
			"name":    []string{"jinzhu", "jinzhu 2"},
			"user_id": []int64{1, 2, 3},
		},
		OrWhere: map[string]interface{}{
			"name": "jinzhu 2",
			"age":  18,
		},
	}
*/
type WhereStruct struct {
	Where    map[string]interface{}
	NotWhere map[string]interface{}
	OrWhere  map[string]interface{}
}
